package com.ghp.common.model.dto.user;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

import static com.ghp.common.constants.ErrorMessageConstants.ACCOUNT_NOT_BLANK;
import static com.ghp.common.constants.ErrorMessageConstants.PARAMS_NOT_NULL;

/**
 * 用户更新请求
 */
@ApiModel(description = "更新用户信息")
@Data
public class UserUpdateDTO implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * id
     */
    @ApiModelProperty(value = "主键id", required = true)
    @NotNull(message = PARAMS_NOT_NULL)
    private Long id;

    /**
     * 用户昵称
     */
    @ApiModelProperty(value = "用户名", required = true)
    @NotBlank(message = ACCOUNT_NOT_BLANK)
    private String userName;

    /**
     * 用户头像
     */
    @ApiModelProperty(value = "头像")
    private String userAvatar;

    /**
     * 简介
     */
    @ApiModelProperty(value = "简介")
    private String userProfile;

    /**
     * 用户角色：user/admin/ban
     */
    @ApiModelProperty(value = "角色")
    @NotBlank(message = PARAMS_NOT_NULL)
    private String userRole;

}
